<template>
	<view class="content">
		<view class="tab">
			<view class="tab1" v-for="(item,index) in tab" @click="tabchange(item.id)"
				:style="{background:a==item.id?'#FFFFFF':'',color:a==item.id?'#409CFD':''}">
				<text>{{item.title}}</text>
			</view>
		</view>

		<view class="search">
			<image src="../../../static/home/search.png" mode=""></image>
			<input type="text" value="" placeholder="搜索" />
		</view>

		<view class="type">
			<view class="type1" v-for="(item,index) in type" :key="index" @click="typechange(index)">
				<text>{{item.title}}</text>
			</view>
		</view>

		<view class="order" v-for="(item,index) in order">
			<view class="order1">
				<view class="order1_l">
					<text>订单号：{{item.orderid}}</text>
				</view>
				<view class="order1_r">
					<text>未支付</text>
				</view>
			</view>

			<view class="order2">
				<view class="order2_l">
					<image src="../../../static/my/shoplogo.png" mode=""></image>
				</view>
				<view class="order2_r">
					<view class="order2_r_1">
						<text>产品名称： XXX</text>
					</view>
					<view class="order2_r_1">
						<text>购买人： XXX</text>
					</view>
					<view class="order2_r_1">
						<text>所属班级： XXX</text>
					</view>
					<view class="order2_r_1">
						<text>总课时： 4</text>
					</view>
				</view>
			</view>
			<view class="order3">
				<text>下单时间：2024-12-20 12：00</text>
				<button type="default" @click="todetails()">查看详情</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				a: 0,
				b: '',
				tab: [{
						id: 0,
						title: '普通订单'
					},
					{
						id: 1,
						title: '特色课订单'
					}
				],
				type: [{
						id: 0,
						title: '订单状态'
					},
					{
						id: 1,
						title: '分账类型'
					},
					{
						id: 2,
						title: '订单日期'
					},
					{
						id: 3,
						title: '完结日期'
					},
					{
						id: 4,
						title: '订单金额'
					}
				],
				order: [{
						id: 0,
						status: 0,
						orderid: '1773244925509382146',
						cptit: 'xxx',
						buy: 'xxx',
						bj: '11',

						ks: '11',

					},
					{
						id:1,
						status: 1,
						orderid: '1773244925509382146',
						cptit: 'xxx',
						buy: 'xxx',
						bj: '11',

						ks: '11',

					},
					{
						id: 2,
						status: 2,
						orderid: '1773244925509382146',
						cptit: 'xxx',
						buy: 'xxx',
						bj: '11',

						ks: '11',

					}
				]
			}
		},
		methods: {
			tabchange(id) {
				this.a = id
			},
			typechange(index) {
				this.b = index
				console.log(this.b)
			},
			todetails(){
				if(this.a==0){
					uni.navigateTo({
						url:'/pages/shop/mushop/order_details'
					})
				}else if(this.a==1){
					uni.navigateTo({
						url:'/pages/shop/mushop/characteristicorder_details'
					})
				}
			
			}
		}
	}
</script>

<style>
	.content {
		width: 750rpx;
		height: 1960rpx;
		background: #FAFAFA;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		padding-top: 30rpx;
	}

	.tab {
		width: 690rpx;
		height: 80rpx;
		background: #F0F1F3;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		display: flex;
		align-items: center;
		margin: auto;
	}

	.tab1 {
		width: 320rpx;
		height: 64rpx;

		border-radius: 4rpx 4rpx 4rpx 4rpx;
		margin: auto;
		display: flex;
		align-items: center;
		justify-content: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
	}

	.search {
		width: 690rpx;
		height: 88rpx;
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		display: flex;
		align-items: center;
		margin: 32rpx auto 0;
	}

	.search image {
		width: 34rpx;
		height: 34rpx;
		margin-left: 28rpx;
		margin-right: 24rpx;
	}

	.type {
		display: flex;
		width: 690rpx;
		margin: auto;

	}

	.type1 {
		margin: auto;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 24rpx;
		color: #666666;
	}

	.type_xl {
		width: 690rpx;
		height: 248rpx;
		background: #F1F8FF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
	}

	.order {
		width: 690rpx;
		height: 480rpx;
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		margin: 32rpx auto 0;
	}

	.order1 {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-left: 32rpx;
		margin-right: 32rpx;
		padding-top: 30rpx;
		padding-bottom: 16rpx;
		border-bottom: 2rpx solid #EAEAEA;
	}

	.order1_l {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
	}

	.order1_r {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #409CFD;
	}

	.order2 {
		display: flex;
	}

	.order2_l {
		margin-top: 16rpx;
		margin-left: 32rpx;
	}

	.order2_l image {
		width: 216rpx;
		height: 216rpx;
	}

	.order2_r {
		margin-top: 16rpx;
		height: 216rpx;
		margin-left: 32rpx;
	}

	.order2_r_1 {
		height: 25%;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #333333;
	}

	.order3 {
		display: flex;
		align-items: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #666666;
		margin-left: 32rpx;
		margin-right: 32rpx;
		margin-top: 56rpx;
	}

	.order3 button {
		width: 176rpx;
		height: 56rpx;
		background: #409CFD;
		border-radius: 120rpx 120rpx 120rpx 120rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 26rpx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-right: 0;

	}
</style>